import request from '@/util/request'

export function checkBuy(data) {
  return request({
    url: '/api/cart/check-buy',
    method: 'post',
    data
  })
}

export function checkRepeat(data) {
  return request({
    url: '/api/cart/check-repeat',
    method: 'post',
    data
  })
}

// add cart
export function addCart(data) {
  return request({
    url: '/api/cart/add-cart',
    method: 'post',
    data
  })
}

// list
export function list(data) {
  return request({
    url: '/api/cart/list',
    method: 'post',
    data
  })
}

// remove
export function remove(data) {
  return request({
    url: '/api/cart/delete-cart',
    method: 'post',
    data
  })
}

// clear
export function clear(data) {
  return request({
    url: '/api/cart/clear-cart',
    method: 'post',
    data
  })
}

// all selected
export function allSelected(data) {
  return request({
    url: '/api/cart/all-selected',
    method: 'post',
    data
  })
}

// item selected
export function itemSelected(data) {
  return request({
    url: '/api/cart/item-selected',
    method: 'post',
    data
  })
}

// increment
export function increment(data) {
  return request({
    url: '/api/cart/increment',
    method: 'post',
    data
  })
}

// decrement
export function decrement(data) {
  return request({
    url: '/api/cart/decrement',
    method: 'post',
    data
  })
}

// get quantity
export function getQuantity(data) {
  return request({
    url: '/api/cart/get-cart-quantity',
    method: 'post',
    data
  })
}
